package st.business.tepth.business.bean;

import android.os.Parcel;
import android.os.Parcelable;

import java.util.ArrayList;

/**
 * @author zhangyu
 * @date 2019/3/25
 * 竣检数据
 */
public class CompleteInfoBean implements Parcelable {
    private int operationState;
    private ArrayList<Info> completeList;
    private String typeName;
    private int status;
    private boolean worker;

    public int getStatus() {
        return status;
    }

    public void setStatus(int status) {
        this.status = status;
    }

    public boolean isWorker() {
        return worker;
    }

    public void setWorker(boolean worker) {
        this.worker = worker;
    }

    public String getTypeName() {
        return typeName;
    }

    public void setTypeName(String typeName) {
        this.typeName = typeName;
    }

    public int getOperationState() {
        return operationState;
    }

    public void setOperationState(int operationState) {
        this.operationState = operationState;
    }

    public ArrayList<Info> getCompleteList() {
        return completeList;
    }

    public void setCompleteList(ArrayList<Info> completeList) {
        this.completeList = completeList;
    }

    public static class Info implements Parcelable {
        private String vehicle_series_name;
        private String phenomenon_name;
        private String work_content;
        private int id;

        public String getVehicle_series_name() {
            return vehicle_series_name;
        }

        public void setVehicle_series_name(String vehicle_series_name) {
            this.vehicle_series_name = vehicle_series_name;
        }

        public String getPhenomenon_name() {
            return phenomenon_name;
        }

        public void setPhenomenon_name(String phenomenon_name) {
            this.phenomenon_name = phenomenon_name;
        }

        public String getWork_content() {
            return work_content;
        }

        public void setWork_content(String work_content) {
            this.work_content = work_content;
        }

        public int getId() {
            return id;
        }

        public void setId(int id) {
            this.id = id;
        }

        @Override
        public int describeContents() {
            return 0;
        }

        @Override
        public void writeToParcel(Parcel dest, int flags) {
            dest.writeString(this.vehicle_series_name);
            dest.writeString(this.phenomenon_name);
            dest.writeString(this.work_content);
            dest.writeInt(this.id);
        }

        public Info() {
        }

        protected Info(Parcel in) {
            this.vehicle_series_name = in.readString();
            this.phenomenon_name = in.readString();
            this.work_content = in.readString();
            this.id = in.readInt();
        }

        public static final Parcelable.Creator<Info> CREATOR = new Parcelable.Creator<Info>() {
            @Override
            public Info createFromParcel(Parcel source) {
                return new Info(source);
            }

            @Override
            public Info[] newArray(int size) {
                return new Info[size];
            }
        };
    }

    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeInt(this.operationState);
        dest.writeTypedList(this.completeList);
        dest.writeString(this.typeName);
        dest.writeByte(this.worker ? (byte) 1 : (byte) 0);
    }

    public CompleteInfoBean() {
    }

    protected CompleteInfoBean(Parcel in) {
        this.operationState = in.readInt();
        this.completeList = in.createTypedArrayList(Info.CREATOR);
        this.typeName = in.readString();
        this.worker = in.readByte() != 0;
    }

    public static final Parcelable.Creator<CompleteInfoBean> CREATOR = new Parcelable.Creator<CompleteInfoBean>() {
        @Override
        public CompleteInfoBean createFromParcel(Parcel source) {
            return new CompleteInfoBean(source);
        }

        @Override
        public CompleteInfoBean[] newArray(int size) {
            return new CompleteInfoBean[size];
        }
    };
}
